<template>
	<view class="wanl-money-log">
		<view class="edgeInsetTop"> </view>
		<!-- 系统 -->
		<block>
			<view class="bg-white padding-xl margin-bottom-bj">
				<view class="text-center solid-bottom title">
					<text>{{moneyData.remark}}</text>
					<view class="wanl-black"> {{moneyData.price > 0 ? '+'+moneyData.price:moneyData.price}} </view>
				</view>
				<view class="list margin-top-xl text-sm">
					<view class="flex">
						<view class="type wanl-gray"> 订单号 </view>
						<view class="info text-price"> {{moneyData.order_id}} </view>
					</view>
					<view class="flex">
						<view class="type wanl-gray"> 订单金额 </view>
						<view class="info text-price"> {{moneyData.price}} </view>
					</view>
					<view class="flex">
						<view class="type wanl-gray"> 生成权益时间 </view>
						<view class="info"> {{$wanlshop.timeFormat(moneyData.createtime,'yyyy-mm-dd hh:MM:ss')}} </view>
					</view>
					<view class="flex">
						<view class="type wanl-gray"> 消费券金额 </view>
						<view class="info text-price"> {{moneyData.price}} </view>
					</view>
					<view v-if="moneyData.state==2">
						<view class="flex">
							<view class="type wanl-gray"> 购买权益时间 </view>
							<view class="info"> {{$wanlshop.timeFormat(moneyData.paytime,'yyyy-mm-dd hh:MM:ss')}} </view>
						</view>
						<view class="flex">
							<view class="type wanl-gray"> 购买权益费用 </view>
							<view class="info"> {{$wanlshop.timeFormat(moneyData.value,'yyyy-mm-dd hh:MM:ss')}} </view>
						</view>
					</view>
					<view v-else>
						<view class="flex">
							<view class="type wanl-gray"> 还未使用消费券权益 </view>
						</view>
					</view>
				</view>
			</view>
		</block>
		<view class="edgeInsetBottom"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				moneyData: {},
				data: null,
				bankList: {
					alipay: '支付宝',
					wechat: '微信',
					jssdk: '微信公众平台',
					ALIPAY: '支付宝',
					WECHAT: '微信',
					ICBC: '工商银行',
					ABC: '农业银行',
					PSBC: '邮储银行',
					CCB: '建设银行',
					CMB: '招商银行',
					BOC: '中国银行',
					COMM: '交通银行',
					SPDB: '浦发银行',
					GDB: '广发银行',
					CMBC: '民生银行',
					PAB: '平安银行',
					CEB: '光大银行',
					CIB: '兴业银行',
					CITIC: '中信银行'
				},
				withdrawStatus: {
					created: '申请中',
					successed: '成功',
					rejected: '已拒绝',
				}
			};
		},
		onLoad(option) {
			this.moneyData = JSON.parse(option.data);
			//this.loadData();
		},
		methods: {
			async loadData() {
				let moneyData = this.moneyData;
				await uni.request({
					url: '/wanlshop/pay/details',
					data: {
						id: moneyData.service_ids,
						type: moneyData.type
					},
					success: res => {
						this.data = res.data;
					}
				});
			}
			
		}
	}
</script>

<style>
	.wanl-money-log .title{
		padding: 20rpx 0 50rpx 0;
	}
	.wanl-money-log .title>view{
		font-size: 70rpx;
		font-weight: 600;
		margin-top: 14rpx;
	}
	.wanl-money-log .list .flex {
		margin-bottom: 25rpx;
	}
	.wanl-money-log .list .flex .type{
		width: 150rpx;
	}
	.wanl-money-log .list .flex .info{
		flex-grow: 1;
	}
	
	.wanl-money-log .goods .item{
		display: flex;
		align-items: center;
		margin: 25rpx 0;
		padding-bottom: 25rpx;
	}
	
	.wanl-money-log .goods .item image{
		width: 100rpx;
		height: 100rpx;
		margin-right: 25rpx;
	}
	.wanl-money-log .goods .item .info{
		flex: 1;
	}
</style>